package com.kpijavatraining6.module2.questions;

import java.util.ArrayList;

/**
 * Created with IntelliJ IDEA.
 * User: user
 * Date: 12.11.13
 * Time: 17:22
 * To change this template use File | Settings | File Templates.
 */
public class Topic {

    ArrayList<Topic> childTopics = new ArrayList<Topic>();
    Topic parentTopic;
    String name;

    public Topic(Topic parentTopic, String name){
        this.parentTopic = parentTopic;
        this.name = name;
        parentTopic.getChildTopic().add(this);
    }

    private ArrayList<Topic> getChildTopic(){
        return childTopics;
    }
}
